import { request } from '@/utils/hsj/service/index'

// 查询资讯列表
export function listInformation(query) {
  return request({
    url: '/system/information/list',
    method: 'get',
    params: query,
  })
}

// 查询资讯详细
export function getInformation(informationId) {
  return request({
    url: '/system/information/' + informationId,
    method: 'get',
  })
}

// 新增资讯
export function addInformation(data) {
  return request({
    url: '/system/information',
    method: 'post',
    data: data,
  })
}

// 修改资讯
export function updateInformation(data) {
  return request({
    url: '/system/information',
    method: 'put',
    data: data,
  })
}

// 修改资讯状态
export function updateStatus(data) {
  return request({
    url: '/system/information/status',
    method: 'post',
    data: data,
  })
}

// 删除资讯
export function delInformation(informationId) {
  return request({
    url: '/system/information/' + informationId,
    method: 'delete',
  })
}
